package org.epidroid.epidroid.androsoul.engine.utils;

import java.util.Iterator;
import java.util.List;

import org.epidroid.epidroid.androsoul.engine.contacts.ContactGroup;
import org.epidroid.epidroid.androsoul.engine.contacts.Contacts;
import org.epidroid.epidroid.androsoul.engine.contacts.Location;
import org.epidroid.epidroid.androsoul.engine.contacts.NetsoulContact;


public class Visitor {

	/**
	 * Visit a group of contacts
	 * @param c group of contacts
	 */
	public void visit(ContactGroup c) {
		Iterator<NetsoulContact> it = c.iterator();
		while (it.hasNext())
		{
			it.next().accept(this);		
		}
	}
	
	public void visit(List<Location> list) {
		Iterator<Location> it = list.iterator();
		while (it.hasNext())
			it.next().accept(this);
	}
	
	public void visit(Location l) {
		
	}

	public void visit(NetsoulContact c) {
	
	}
	
	public void visit(Contacts c) {
		Iterator<ContactGroup> it = c.iterator();
		while (it.hasNext())
			it.next().accept(this);		
	}
}
